package daily.commons

import daily.DateUtils


/**
 * Created with IntelliJ IDEA.
 * User: zjzhai
 * Date: 10/20/13
 * Time: 4:43 PM
 * To change this template use File | Settings | File Templates.
 */
public enum CalendarView {
    month {
        @Override
        Date getStart(Date date) {
            DateUtils.startOfMonth(date)
        }

        @Override
        Date getEnd(Date date) {
            DateUtils.endOfMonth(date)
        }

    },
    basicWeek {
        @Override
        Date getStart(Date date) {
            DateUtils.startOfWeek(date)
        }

        @Override
        Date getEnd(Date date) {
            DateUtils.endOfWeek(date)
        }

    },
    basicDay {
        @Override
        Date getStart(Date date) {
            DateUtils.startOfDay(date)
        }

        @Override
        Date getEnd(Date date) {
            DateUtils.endOfDay(date)
        }

    },
    agendaWeek {
        @Override
        Date getStart(Date date) {
            DateUtils.startOfWeek(date)
        }

        @Override
        Date getEnd(Date date) {
            DateUtils.endOfWeek(date)
        }

    },
    agendaDay {
        @Override
        Date getStart(Date date) {
            DateUtils.startOfDay(date)

        }

        @Override
        Date getEnd(Date date) {
            DateUtils.endOfDay(date)
        }

    }

    abstract Date getStart(Date date);

    abstract Date getEnd(Date date);


}